package com.company.anr.model;

import java.time.LocalDateTime;
import java.util.List;

public class AnalysisResponse {

  private boolean success;
  private String message;
  private String deviceSn;
  private LocalDateTime analysisTime;
  private String outputDirectory;
  private List<String> generatedFiles;
  private String errorDetails;


  public AnalysisResponse() {
  }

  public AnalysisResponse(boolean success, String message) {
    this.success = success;
    this.message = message;
    this.analysisTime = LocalDateTime.now();
  }

  public AnalysisResponse(boolean success, String message, String deviceSn, String outputDirectory,
      List<String> generatedFiles) {
    this.success = success;
    this.message = message;
    this.deviceSn = deviceSn;
    this.analysisTime = LocalDateTime.now();
    this.outputDirectory = outputDirectory;
    this.generatedFiles = generatedFiles;
  }

  // Getters and Setters
  public boolean isSuccess() {
    return success;
  }

  public void setSuccess(boolean success) {
    this.success = success;
  }

  public String getMessage() {
    return message;
  }

  public void setMessage(String message) {
    this.message = message;
  }

  public String getDeviceSn() {
    return deviceSn;
  }

  public void setDeviceSn(String deviceSn) {
    this.deviceSn = deviceSn;
  }

  public LocalDateTime getAnalysisTime() {
    return analysisTime;
  }

  public void setAnalysisTime(LocalDateTime analysisTime) {
    this.analysisTime = analysisTime;
  }

  public String getOutputDirectory() {
    return outputDirectory;
  }

  public void setOutputDirectory(String outputDirectory) {
    this.outputDirectory = outputDirectory;
  }

  public List<String> getGeneratedFiles() {
    return generatedFiles;
  }

  public void setGeneratedFiles(List<String> generatedFiles) {
    this.generatedFiles = generatedFiles;
  }

  public String getErrorDetails() {
    return errorDetails;
  }

  public void setErrorDetails(String errorDetails) {
    this.errorDetails = errorDetails;
  }

  @Override
  public String toString() {
    return "AnalysisResponse{" +
        "success=" + success +
        ", message='" + message + '\'' +
        ", deviceSn='" + deviceSn + '\'' +
        ", analysisTime=" + analysisTime +
        ", outputDirectory='" + outputDirectory + '\'' +
        '}';
  }
}

